<template>
  <el-form :inline="true" :model="queryForm" class="demo-form-inline" style="float: right">
    <el-form-item>
      <el-input v-model="queryForm.body.username" placeholder="员工编号" clearable/>
    </el-form-item>
    <el-form-item>
      <el-input v-model="queryForm.body.name" placeholder="员工名称" clearable/>
    </el-form-item>
    <el-form-item>
      <el-input v-model="queryForm.body.role" placeholder="角色" clearable/>
    </el-form-item>
  </el-form>
</template>

<script setup>
import {ref, watch} from 'vue';

const props = defineProps({
  queryForm: Object
});

const emit = defineEmits(['search']);

watch(
    () => props.queryForm.body,
    (newVal, oldVal) => {
      emit('search');
    },
    {deep: true}
);
</script>